home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-07 | 1.6 KB | 71 lines | [TEXT/MPS ] |
- (*
- videoStatus() -- Return the status of the player as a comma-separated list containing:
- CLV or CAV - type of disc
- doorOpen or park or still or play - state of player
- disc12inch or disc8inch - size of disc being played
- side1 or side2 - side of disc being played
- or noAnswer if the player did not answer
- or notImplemented if the player answered but cannot return any of the info.
-
- To compile and link this file using Macintosh Programmer's Workshop,
-
- pascal -w videoStatus.p
-
- link -m ENTRYPOINT -o HyperCommands -rt XFCN=8008 -sn Main=videoStatus ∂
- videoStatus.p.o "{MPW}"Libraries:interface.o "{MPW}"PLibraries:PasLib.o
-
- Copyright © 1988 Apple Computer, Inc.
-
- 2/88 - Initial coding by Harry R. Chesley.
- *)
-
- {$R-}
-
- {$S videoStatus } { Segment name must be the same as the command name. }
-
- unit DummyUnit;
-
- interface
-
- uses MemTypes, QuickDraw, OSIntf, ToolIntf, HyperXCmd;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- implementation
-
- type
-
- Str31 = String[31];
-
- procedure videoStatus(paramPtr: XCmdPtr); forward;
-
- procedure EntryPoint(paramPtr: XCmdPtr);
-
- begin
- videoStatus(paramPtr);
- end;
-
- procedure videoStatus(paramPtr: XCmdPtr);
-
- {$I XCmdGlue.inc}
-
- procedure Fail(errMsg: Str255); { set theResult and quit }
- begin
- paramPtr^.returnValue := PasToZero(errMsg);
- exit(videoStatus);
- end;
-
- {$I VideoUtil.inc}
-
- begin
- if paramPtr^.paramCount <> 0 then Fail('parameter count is not 0');
-
- { Clear out any pending input. }
- EvalAndDispose('recvUpTo(empty,0,empty)');
-
- { Return the current player status. }
- paramPtr^.returnValue := PasToZero(videoFunc('status',''))
- end;
-
- end.
-